package models;

import com.et.ar.ActiveRecordBase;
import com.et.ar.annotations.BelongsTo;
import com.et.ar.annotations.Column;
import com.et.ar.annotations.Id;
import com.et.ar.annotations.Table;
import com.et.ar.annotations.Unique;

import java.sql.*;

//跟进信息  包含 信息 、文件(doc/docx/xlsx/xls/zip/rar)、图片(jpg/png/bmp)、视频（mp4）
@Table(name="followtable")
public class Followtable extends ActiveRecordBase{
	@Id private Integer id;
	@Column private String xh;
	@Column private String name;
	@Column private String context;
	@Column private Integer storetype;
	@Column private Integer fileid;
	@Column private String filepath;
	@Column private Integer filetype;
	@Column private Integer sort;
	@Column private String oper;
	@Column private Timestamp inputdate;
	@Column private Timestamp editdate;


	//	@BelongsTo(foreignKey="demoId")
	//	private Demo demo;

	//	public Demo getDemo() {
	//		return demo;
	//	}
	//	public void setDemo(Demo demo) {
	//		this.demo = demo;
	//	}

	//	public int getChildCount() throws Exception {
	//		return (int)count(Followtable.class, "parentId=?", new Object[]{id});
	//	}
	//	public String findChildIds() throws Exception {
	//		String s = "";
	//		List<Integer> ids = new ArrayList<Integer>();
	//		ids.add(id);
	//		while(!ids.isEmpty()){
	//			int id = ids.remove(0);
	//			s += id + ",";
	//			for(Followtable item: Followtable.findAll(Followtable.class, "parentId=?", new Object[]{id})){
	//				ids.add(item.getId());
	//			}
	//		}
	//		if (!s.equals("")){
	//			s = s.substring(0, s.length() - 1);
	//		}
	//		return s;
	//	}
	public void setId(Integer id){
		this.id=id;
	}
	public Integer getId(){
		return id;
	}

	public void setXh(String xh){
		this.xh=xh;
	}
	public String getXh(){
		return xh;
	}

	public void setName(String name){
		this.name=name;
	}
	public String getName(){
		return name;
	}

	public void setContext(String context){
		this.context=context;
	}
	public String getContext(){
		return context;
	}

	public void setStoretype(Integer storetype){
		this.storetype=storetype;
	}
	public Integer getStoretype(){
		return storetype;
	}

	public void setFileid(Integer fileid){
		this.fileid=fileid;
	}
	public Integer getFileid(){
		return fileid;
	}

	public void setFilepath(String filepath){
		this.filepath=filepath;
	}
	public String getFilepath(){
		return filepath;
	}

	public void setFiletype(Integer filetype){
		this.filetype=filetype;
	}
	public Integer getFiletype(){
		return filetype;
	}

	public void setSort(Integer sort){
		this.sort=sort;
	}
	public Integer getSort(){
		return sort;
	}

	public void setOper(String oper){
		this.oper=oper;
	}
	public String getOper(){
		return oper;
	}

	public void setInputdate(Timestamp inputdate){
		this.inputdate=inputdate;
	}
	public Timestamp getInputdate(){
		return inputdate;
	}

	public void setEditdate(Timestamp editdate){
		this.editdate=editdate;
	}
	public Timestamp getEditdate(){
		return editdate;
	}

}

